package cloud.gateway.web;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.web.client.RestTemplate;

/**
 * Hello world!网关 
 * 先用定时
 * 回头再修改成mq
 *
 */
@EnableScheduling
@EnableDiscoveryClient
@SpringBootApplication 
public class GateWayApplication 
{
    public static void main( String[] args )
    {
        SpringApplication.run(GateWayApplication.class, args);
    }
    
	@Bean
	@LoadBalanced
	public RestTemplate restTemplate(){
		return new RestTemplate();
	}
}
